package com.ima.web.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ima.web.beans.db.Roles;
import com.ima.web.dao.RolesDao;
import com.ima.web.service.RolesService;

@Service
@Transactional
public class RolesServiceImpl implements RolesService {

	private RolesDao rolesDao;
	
	@Autowired
	public void setDependencies(RolesDao rolesDao){
		this.rolesDao = rolesDao;
	}
	
	@Override
	public List<Roles> getAllRoles() {
		return rolesDao.list(new Roles());
	}

	@Override
	public Roles getNormalUserRole() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Roles getRoleById(int id) {
		return rolesDao.findById(id);
	}

}
